E143g1pQ2={{0.031,0.008432,0.004639034},{0.035,0.01638,0.003541751},{0.039,0.011037,0.003169575},{0.044,0.014696,0.003019375},{0.049,0.016366,0.002805009},{0.056,0.017472,0.002746285},{0.063,0.016821,0.002610512},{0.071,0.020732,0.002584439},{0.079,0.024095,0.00258295},{0.09,0.02313,0.002376068},{0.101,0.029492,0.002484272},{0.113,0.029832,0.002526757},{0.128,0.032384,0.002748277},{0.144,0.032976,0.002769895},{0.162,0.039204,0.002973925},{0.182,0.042224,0.003255715},{0.205,0.046125,0.003305526},{0.23,0.04646,0.003510798},{0.259,0.062419,0.00417625},{0.292,0.057524,0.004570523},{0.329,0.058891,0.005315158},{0.37,0.05957,0.005500445},{0.416,0.073632,0.006184285},{0.468,0.070668,0.00695732},{0.526,0.073114,0.009186195},{0.592,0.06216,0.011387347},{0.666,0.04662,0.016039404},{0.749,0.05992,0.018784824}};

HermesQ2p5={{0.023,0.008625,0.00200483},{0.028,0.01106,0.001935041},{0.033,0.009504,0.001778942},{0.04,0.01264,0.001984742},{0.047,0.015463,0.002152272},{0.056,0.016912,0.002190452},{0.067,0.014271,0.002119785},{0.08,0.0228,0.00257247},{0.095,0.02261,0.002641273},{0.114,0.028044,0.003088538},{0.136,0.035496,0.003694597},{0.162,0.035154,0.003799237},{0.193,0.044583,0.004579431},{0.23,0.04876,0.004916838},{0.274,0.050416,0.005220401},{0.327,0.063765,0.006457733},{0.389,0.061462,0.006804721},{0.464,0.056608,0.007218146},{0.55,0.0737,0.008851412},{0.66,0.04488,0.008605347}};

E143g1pQ3={{0.031,0.009114,0.005022478},{0.035,0.01764,0.003807447},{0.039,0.011856,0.003416231},{0.044,0.015708,0.00321441},{0.049,0.017493,0.003006221},{0.056,0.018592,0.002923286},{0.063,0.017829,0.002772716},{0.071,0.021939,0.002742476},{0.079,0.025438,0.002759351},{0.09,0.0243,0.002495776},{0.101,0.030906,0.002620167},{0.113,0.031188,0.002678839},{0.128,0.033664,0.002748277},{0.144,0.034272,0.002897944},{0.162,0.0405,0.003116132},{0.182,0.043316,0.003255715},{0.205,0.046945,0.003305526},{0.23,0.04692,0.003510798},{0.259,0.062419,0.00417625},{0.292,0.05694,0.004570523},{0.329,0.057246,0.005011179},{0.37,0.05661,0.005500445},{0.416,0.068224,0.00579421},{0.468,0.062712,0.005919784},{0.526,0.06049,0.007531174},{0.592,0.046176,0.008372144},{0.666,0.030636,0.010676792},{0.749,0.034454,0.010512716}};

E143g1pQ5={{0.031,0.009982,0.005503701},{0.035,0.01932,0.004207285},{0.039,0.012987,0.003749278},{0.044,0.01716,0.003507327},{0.049,0.019061,0.003286289},{0.056,0.020272,0.00317229},{0.063,0.019404,0.003030555},{0.071,0.023856,0.002992968},{0.079,0.027571,0.002935783},{0.09,0.02628,0.002696998},{0.101,0.03333,0.002845979},{0.113,0.033448,0.002779432},{0.128,0.035968,0.002977204},{0.144,0.036288,0.003027427},{0.162,0.042606,0.003260187},{0.182,0.045136,0.00350084},{0.205,0.04838,0.00341188},{0.23,0.04784,0.003708639},{0.259,0.062678,0.00417625},{0.292,0.056064,0.004570523},{0.329,0.055601,0.005011179},{0.37,0.05402,0.005153504},{0.416,0.062816,0.005408},{0.468,0.055224,0.0054778},{0.526,0.04997,0.006506261},{0.592,0.034928,0.006618761},{0.666,0.01998,0.006693217},{0.749,0.019474,0.006038631}};


SMC97g1pQ10={{0.005,0.01185,0.005913967},{0.008,0.00824,0.005088654},{0.014,0.01106,0.004706166},{0.025,0.01275,0.00730582},{0.035,0.0077,0.009133592},{0.049,0.01813,0.008387449},{0.077,0.0308,0.007890152},{0.122,0.04758,0.010134081},{0.173,0.04325,0.014370459},{0.242,0.0363,0.012574689},{0.342,0.05814,0.014101021},{0.482,0.03856,0.00964}};

SMC98g1pQ10={{0.005,0.00595,0.003347014},{0.008,0.00576,0.002913143},{0.014,0.00826,0.002355165},{0.025,0.0125,0.003372684},{0.035,0.01365,0.00392874},{0.049,0.01862,0.003567254},{0.077,0.03003,0.003443545},{0.122,0.04026,0.004398773},{0.173,0.04671,0.00547074},{0.242,0.05324,0.005927765},{0.342,0.06156,0.007647352},{0.48,0.0432,0.0048}};

alldata={{2,0.031,0.008432},{2,0.035,0.01638},{2,0.039,0.011037},{2,0.044,0.014696},{2,0.049,0.016366},{2,0.056,0.017472},{2,0.063,0.016821},{2,0.071,0.020732},{2,0.079,0.024095},{2,0.09,0.02313},{2,0.101,0.029492},{2,0.113,0.029832},{2,0.128,0.032384},{2,0.144,0.032976},{2,0.162,0.039204},{2,0.182,0.042224},{2,0.205,0.046125},{2,0.23,0.04646},{2,0.259,0.062419},{2,0.292,0.057524},{2,0.329,0.058891},{2,0.37,0.05957},{2,0.416,0.073632},{2,0.468,0.070668},{2,0.526,0.073114},{2,0.592,0.06216},{2,0.666,0.04662},{2,0.749,0.05992},{2,0.023,0.008625},{2,0.028,0.01106},{2,0.033,0.009504},{2,0.04,0.01264},{2,0.047,0.015463},{2,0.056,0.016912},{2,0.067,0.014271},{2,0.08,0.0228},{2,0.095,0.02261},{2,0.114,0.028044},{2,0.136,0.035496},{2,0.162,0.035154},{2,0.193,0.044583},{2,0.23,0.04876},{2,0.274,0.050416},{2,0.327,0.063765},{2,0.389,0.061462},{2,0.464,0.056608},{2,0.55,0.0737},{2,0.66,0.04488},{3,0.031,0.009114},{3,0.035,0.01764},{3,0.039,0.011856},{3,0.044,0.015708},{3,0.049,0.017493},{3,0.056,0.018592},{3,0.063,0.017829},{3,0.071,0.021939},{3,0.079,0.025438},{3,0.09,0.0243},{3,0.101,0.030906},{3,0.113,0.031188},{3,0.128,0.033664},{3,0.144,0.034272},{3,0.162,0.0405},{3,0.182,0.043316},{3,0.205,0.046945},{3,0.23,0.04692},{3,0.259,0.062419},{3,0.292,0.05694},{3,0.329,0.057246},{3,0.37,0.05661},{3,0.416,0.068224},{3,0.468,0.062712},{3,0.526,0.06049},{3,0.592,0.046176},{3,0.666,0.030636},{3,0.749,0.034454},{5,0.031,0.009982},{5,0.035,0.01932},{5,0.039,0.012987},{5,0.044,0.01716},{5,0.049,0.019061},{5,0.056,0.020272},{5,0.063,0.019404},{5,0.071,0.023856},{5,0.079,0.027571},{5,0.09,0.02628},{5,0.101,0.03333},{5,0.113,0.033448},{5,0.128,0.035968},{5,0.144,0.036288},{5,0.162,0.042606},{5,0.182,0.045136},{5,0.205,0.04838},{5,0.23,0.04784},{5,0.259,0.062678},{5,0.292,0.056064},{5,0.329,0.055601},{5,0.37,0.05402},{5,0.416,0.062816},{5,0.468,0.055224},{5,0.526,0.04997},{5,0.592,0.034928},{5,0.666,0.01998},{5,0.749,0.019474},{10,0.005,0.01185},{10,0.008,0.00824},{10,0.014,0.01106},{10,0.025,0.01275},{10,0.035,0.0077},{10,0.049,0.01813},{10,0.077,0.0308},{10,0.122,0.04758},{10,0.173,0.04325},{10,0.242,0.0363},{10,0.342,0.05814},{10,0.482,0.03856},{10,0.005,0.00595},{10,0.008,0.00576},{10,0.014,0.00826},{10,0.025,0.0125},{10,0.035,0.01365},{10,0.049,0.01862},{10,0.077,0.03003},{10,0.122,0.04026},{10,0.173,0.04671},{10,0.242,0.05324},{10,0.342,0.06156},{10,0.48,0.0432}};


xg1nE143Q2={{0.031`,0.002635`,0.011984016`},{0.035`,-0.01421`,0.008856107`},{0.039`,0.005967`,0.007987387`},{0.044`,-0.01826`,0.007556223`},{0.049`,-0.020237`,0.007130637`},{0.056`,-0.0126`,0.007022364`},{0.063`,-0.014427`,0.006833395`},{0.071`,-0.01278`,0.00680897`},{0.079`,-0.01896`,0.006770535`},{0.09`,0.00135`,0.006570616`},{0.101`,-0.012625`,0.006639166`},{0.113`,-0.015368`,0.006716612`},{0.128`,0.002816`,0.007173712`},{0.144`,0.007632`,0.007517021`},{0.162`,-0.01539`,0.007858252`},{0.182`,0.011102`,0.008521022`},{0.205`,-0.01763`,0.008494523`},{0.23`,-0.01081`,0.00931429`},{0.259`,-0.037296`,0.011064485`},{0.292`,0.002628`,0.012281369`},{0.329`,0.011844`,0.014150825`},{0.37`,0.01147`,0.015451654`},{0.416`,-0.027872`,0.017152119`},{0.468`,-0.008424`,0.019188`},{0.526`,0.008416`,0.025171175`},{0.592`,-0.010656`,0.030475065`},{0.666`,-0.00999`,0.044746081`},{0.749`,0.025466`,0.054927802`}};

xg1nE143Q3={{0.031`,0.002821`,0.012938852`},{0.035`,-0.015295`,0.009509958`},{0.039`,0.006396`,0.008592754`},{0.044`,-0.019536`,0.008069293`},{0.049`,-0.02156`,0.007641801`},{0.056`,-0.01344`,0.007471332`},{0.063`,-0.015309`,0.007216182`},{0.071`,-0.01349`,0.007185396`},{0.079`,-0.019908`,0.007095942`},{0.09`,0.00144`,0.006854196`},{0.101`,-0.013231`,0.00695728`},{0.113`,-0.015933`,0.007072211`},{0.128`,0.002944`,0.007454833`},{0.144`,0.00792`,0.007696931`},{0.162`,-0.015876`,0.008015317`},{0.182`,0.011284`,0.008692286`},{0.205`,-0.017835`,0.008494523`},{0.23`,-0.01081`,0.00931429`},{0.259`,-0.036519`,0.010816158`},{0.292`,0.002628`,0.012004006`},{0.329`,0.011186`,0.013525062`},{0.37`,0.01073`,0.014282192`},{0.416`,-0.02496`,0.015436907`},{0.468`,-0.00702`,0.016346537`},{0.526`,0.006838`,0.019911723`},{0.592`,-0.007104`,0.021516574`},{0.666`,-0.005994`,0.027379`},{0.749`,0.013482`,0.029364239`}};

xg1nE143Q5={{0.031`,0.0031`,0.014209806`},{0.035`,-0.016765`,0.010427944`},{0.039`,0.00702`,0.009407007`},{0.044`,-0.02134`,0.008848815`},{0.049`,-0.02352`,0.008307632`},{0.056`,-0.014616`,0.008163909`},{0.063`,-0.016632`,0.007871975`},{0.071`,-0.014626`,0.007755917`},{0.079`,-0.021567`,0.007669513`},{0.09`,0.00153`,0.007400277`},{0.101`,-0.014241`,0.007471952`},{0.113`,-0.017063`,0.00753804`},{0.128`,0.003072`,0.007859242`},{0.144`,0.008352`,0.008110154`},{0.162`,-0.016524`,0.008369303`},{0.182`,0.011648`,0.008925425`},{0.205`,-0.018245`,0.008687744`},{0.23`,-0.01081`,0.00931429`},{0.259`,-0.03626`,0.010816158`},{0.292`,0.002628`,0.011727354`},{0.329`,0.010528`,0.012797212`},{0.37`,0.00999`,0.013574513`},{0.416`,-0.022464`,0.013828481`},{0.468`,-0.006084`,0.013961782`},{0.526`,0.00526`,0.015577062`},{0.592`,-0.005328`,0.015573089`},{0.666`,-0.003996`,0.017367155`},{0.749`,0.006741`,0.015800172`}};

xg1DE143Q2={{0.031`,0.005146`,0.005125135`},{0.035`,0.001015`,0.003760668`},{0.039`,0.007878`,0.003386494`},{0.044`,-0.001672`,0.003212301`},{0.049`,-0.001715`,0.003018973`},{0.056`,0.00224`,0.002976441`},{0.063`,0.001701`,0.002879452`},{0.071`,0.003763`,0.002871772`},{0.079`,0.003002`,0.0028713`},{0.09`,0.0108`,0.002737243`},{0.101`,0.007979`,0.002856711`},{0.113`,0.007232`,0.002845267`},{0.128`,0.016384`,0.00298819`},{0.144`,0.01872`,0.003078368`},{0.162`,0.011502`,0.003276247`},{0.182`,0.025662`,0.003533801`},{0.205`,0.01394`,0.003632609`},{0.23`,0.01633`,0.003855503`},{0.259`,0.012691`,0.004523241`},{0.292`,0.027448`,0.005099561`},{0.329`,0.0329`,0.005745738`},{0.37`,0.03293`,0.006461772`},{0.416`,0.023712`,0.006860848`},{0.468`,0.029952`,0.008173269`},{0.526`,0.038924`,0.010213073`},{0.592`,0.025456`,0.011899053`},{0.666`,0.017316`,0.016039404`},{0.749`,0.035952`,0.018784824`}};

xg1DE143Q3={{0.031`,0.00558`,0.005568967`},{0.035`,0.001085`,0.004049275`},{0.039`,0.008502`,0.003670354`},{0.044`,-0.00176`,0.003446916`},{0.049`,-0.001813`,0.003210155`},{0.056`,0.002352`,0.003195927`},{0.063`,0.001764`,0.003065712`},{0.071`,0.003976`,0.003023133`},{0.079`,0.00316`,0.003027875`},{0.09`,0.01125`,0.002914944`},{0.101`,0.008383`,0.002956731`},{0.113`,0.007571`,0.002972566`},{0.128`,0.017024`,0.003114374`},{0.144`,0.01944`,0.003219938`},{0.162`,0.011826`,0.003304165`},{0.182`,0.026026`,0.003533801`},{0.205`,0.014145`,0.003632609`},{0.23`,0.01633`,0.003855503`},{0.259`,0.012691`,0.004523241`},{0.292`,0.026864`,0.004815787`},{0.329`,0.031584`,0.005426007`},{0.37`,0.03071`,0.006102196`},{0.416`,0.021216`,0.006363576`},{0.468`,0.02574`,0.00670074`},{0.526`,0.03156`,0.008046253`},{0.592`,0.018352`,0.008372144`},{0.666`,0.011322`,0.010676792`},{0.749`,0.020972`,0.010512716`}};

xg1DE143Q5={{0.031`,0.006138`,0.006140505`},{0.035`,0.00119`,0.004482187`},{0.039`,0.009321`,0.004039655`},{0.044`,-0.001936`,0.003756528`},{0.049`,-0.00196`,0.003518459`},{0.056`,0.002576`,0.003481471`},{0.063`,0.001953`,0.003324705`},{0.071`,0.00426`,0.003303599`},{0.079`,0.003476`,0.003273499`},{0.09`,0.01215`,0.003092911`},{0.101`,0.008989`,0.003156957`},{0.113`,0.008136`,0.003196123`},{0.128`,0.018048`,0.003240701`},{0.144`,0.020448`,0.003361714`},{0.162`,0.012312`,0.003463164`},{0.182`,0.026936`,0.003752026`},{0.205`,0.01435`,0.003632609`},{0.23`,0.01656`,0.003855503`},{0.259`,0.012691`,0.004523241`},{0.292`,0.02628`,0.004815787`},{0.329`,0.030268`,0.005426007`},{0.37`,0.02886`,0.005743945`},{0.416`,0.019552`,0.005956214`},{0.468`,0.022464`,0.005693466`},{0.526`,0.025774`,0.006399066`},{0.592`,0.013616`,0.006538854`},{0.666`,0.007326`,0.006693217`},{0.749`,0.011984`,0.006038631`}};

E143xg2Q={{0.038`,0.018582`,0.039318966`},{0.06`,0.02382`,0.023918863`},{0.095`,-0.02242`,0.020526376`},{0.152`,-0.020672`,0.020407663`},{0.241`,-0.011086`,0.020043609`},{0.379`,-0.01895`,0.018509019`},{0.595`,-0.022015`,0.012135666`},{0.101`,0.00606`,0.038778213`},{0.155`,0.026505`,0.023137093`},{0.243`,-0.016524`,0.017758961`},{0.382`,-0.014898`,0.013260408`},{0.584`,-0.012848`,0.006529318`}};

avu=0.535;
bvu=3.222;
cvu=8.18;
avd=0.53;
bvd=3.878;
cvd=4.789;
as=0.474;
bs=9.31;
ag=2.833;
bg=5.747;
lan=0.474;
etas=-0.054;
etag=0.224;
Λ=lan^2;
Q0=4;
 f=3;
ff=4;
β0=11-(2/3)ff;
β1=102-(38/3)ff;

α0=4π((1/(β0*Log[(Q0/Λ)]))-((β1)/(((β0))^3))((Log[Log[(Q0/Λ)]])/(((Log[(Q0/Λ)]))^2)))

δUn=((0.926` Gamma[2.`+avu+bvu])/((1.`+avu+bvu+avu cvu) Gamma[avu] Gamma[1.`+bvu])) (((avu+bvu+n+cvu (-1+avu+n)) Gamma[1+bvu] Gamma[-1+avu+n])/(Gamma[1+avu+bvu+n]));


δDn=-((0.341` Gamma[2.`+avd+bvd])/((1.`+avd+bvd+avd cvd) Gamma[avd] Gamma[1.`+bvd]))  (((avd+bvd+n+cvd (-1+avd+n)) Gamma[1+bvd] Gamma[-1+avd+n])/(Gamma[1+avd+bvd+n]));
asnormal=(((Beta[as,bs+1]))^(-1));

δsn=asnormal((etas Gamma[1+bs] Gamma[-1+as+n])/( Gamma[as+bs+n]));
agnormal=(((Beta[ag,bg+1]))^(-1));
δgn=agnormal((etag   Gamma[1+bg] Gamma[-1+ag+n])/(Gamma[ag+bg+n]));

Λ=lan^2;
Q0=4;
 f=3;
ff=4;
β0=11-(2/3)ff;
β1=102-(38/3)ff;
"Q=Input["Q"]"; 
αQ=4π((1/(β0*Log[(Q/Λ)]))-((β1)/(((β0))^3))((Log[Log[(Q/Λ)]])/(((Log[(Q/Λ)]))^2)));
α0=4π((1/(β0*Log[(Q0/Λ)]))-((β1)/(((β0))^3))((Log[Log[(Q0/Λ)]])/(((Log[(Q0/Λ)]))^2)));
cf=(4/3);
ca=3;
 tf=f;
tr=f/2;
L=((αQ)/(α0));
"Lo Input Spliting Function";
γe=0.577216; 
s1=PolyGamma[n+1]+γe; 
δpqq0=(4/3)((3/2)+(1/(n(n+1)))-2 s1);
δpqg0=(1/2)((n-1)/(n(n+1)));
δpgq0=(4/3)((n+2)/(n(n+1)));
δpgg0=3((11/6)+(4/(n(n+1)))-2 s1)-(2/3)(f/2); 
"NLO Input Spliting Function";
s1=PolyGamma[n+1]+γe;
s2=Zeta[2]-PolyGamma[1,n+1];
s3=Zeta[3]+(1/2)PolyGamma[2,n+1];
sp2=(1/2)(1+η)(Zeta[2]-PolyGamma[1,(n/2)+1])+(1/2)(1-η)(Zeta[2]-PolyGamma[1,((n-1)/2)+1]);
sp3=(1/2)(1+η)(Zeta[3]+(1/2)PolyGamma[2,(n/2)+1])+(1/2)(1-η)(Zeta[3]+(1/2)PolyGamma[2,((n-1)/2)+1]);
G=PolyGamma[n+(1/2)]-PolyGamma[n/2];
Lin=Integrate[(x^(n-1))(1.010 x-0.846 (x^2)+1.155 (x^3)-1.074 (x^4)+0.55 (x^5)),{x,0,1},GenerateConditions->False];
(OverBar[s])=-(5/8)Zeta[3]+η((s1/(n^2))-((Zeta[2])/2)G+Lin); 
"=======================================";
δpnsp1=-((((cf))^2)(2((2 n+1)/((n^2)(((n+1))^2)))s1+2(2 s1-(1/(n(n+1))))(s2-sp2)+3 s2+8 (OverBar[s])-sp3-((3 (n^3)+(n^2)-1)/((n^3)(((n+1))^3)))-(3/8)-2((2 (n^2)+2 n+1)/((n^3)(((n+1))^3))))+cf*ca((67/9)s1-(2 s1-(1/(n(n+1))))(2 s2-sp2)-(11/3)s2-4 (OverBar[s])+(1/2)sp3-(1/18)((151 (n^4)+236 (n^3)+88 (n^2)+3n+18)/((n^3)(((n+1))^3)))-(17/24)+((2 (n^2)+2 n+1)/((n^3)(((n+1))^3))))+cf*tf*(-(20/9)s1+(4/3)s2+(2/9)((11 (n^2)+5 n-3)/((n^2)(((n+1))^2)))+(1/6)));
"=======================================";
δpnsm1=-((((cf))^2)(2((2 n+1)/((n^2)(((n+1))^2)))s1+2(2 s1-(1/(n(n+1))))(s2-sp2)+3 s2+8 (OverBar[s])-sp3-((3 (n^3)+(n^2)-1)/((n^3)(((n+1))^3)))-(3/8)+2((2 (n^2)+2 n+1)/((n^3)(((n+1))^3))))+cf*ca*((67/9)s1-(2 s1-(1/(n(n+1))))(2 s2-sp2)-(11/3)s2-4 (OverBar[s])+(1/2)sp3-(1/18)((151 (n^4)+236 (n^3)+88 (n^2)+3n+18)/((n^3)(((n+1))^3)))-(17/24)-((2 (n^2)+2 n+1)/((n^3)(((n+1))^3))))+cf*tf*(-(20/9)s1+(4/3)s2+(2/9)((11 (n^2)+5 n-3)/((n^2)(((n+1))^2)))+(1/6)));
"=======================================";
δppsqq1=-2 cf*tf*(((n^4)+2 (n^3)+2 (n^2)+5 n+2)/((n^3)(((n+1))^3)));
"======================================="; 
δpqq1=δppsqq1+δpnsm1;
"=======================================";
δpqg1=((-1)/(2 f))(cf*tf*(2((n-1)/(n(n+1)))(s2-(((s1))^2))+4((n-1)/((n^2)(n+1)))s1-((5 (n^5)+5 (n^4)-10 (n^3)-(n^2)+3 n-2)/((n^3)(((n+1))^3))))+2 ca*tf*(((n-1)/(n(n+1)))(-s2+sp2+(((s1))^2))-(4/(n(((n+1))^2)))s1-(((n^5)+(n^4)-4 (n^3)+3 (n^2)-7 n-2)/((n^3)(((n+1))^3)))));
"=======================================";
δpgq1=-(4 cf*tf*(-((n+2)/(3 n(n+1)))s1+((5 (n^2)+12 n+4)/(9 n(((n+1))^2))))+(((cf))^2)(((n+2)/(n(n+1)))(s2+(((s1))^2))-((3 (n^2)+7 n+2)/(n(((n+1))^2)))s1+((9 (n^5)+30 (n^4)+24 (n^3)-7 (n^2)-16 n-4)/(2 (n^3)(((n+1))^3))))+cf*ca*(((n+2)/(n(n+1)))(-s2+sp2-(((s1))^2))+((11 (n^2)+22 n+12)/(3 (n^2)(n+1)))s1-(76 (n^5)+271 (n^4)+254 (n^3)+41 (n^2)+72 n+36)/(9(n^3)(((n+1))^3))));
"=======================================";
δpgg1=-(cf*tf*(((n^6)+3 (n^5)+5 (n^4)+(n^3)-8 (n^2)+2 n+4)/((n^3)(((n+1))^3)))+4*tf*ca*(-(5/9)*s1+((3 (n^4)+6 (n^3)+16 (n^2)+13 n-3)/(9 (n^2)(((n+1))^2))))+(((ca))^2)(-(1/2)sp3-2 s1*sp2+4 (OverBar[s])+(4/(n(n+1)))sp2+((67 (n^4)+134 (n^3)+67 (n^2)+144 n+72)/(9 (n^2)(((n+1))^2)))s1-(48 (n^6)+144 (n^5)+469 (n^4)+698 (n^3)+7 (n^2)+258 n+144)/(18 (n^3)(((n+1))^3))));
"=======================================";
(R=(({{δpqq1, 2f δpqg1}, {δpgq1, δpgg1}}))-((β1)/(2 β0))(({{δpqq0, 2 f δpqg0}, {δpgq0, δpgg0}})))//MatrixForm;
(SubPlus[λ])=(1/2)(δpqq0+δpgg0+(Sqrt[(((δpqq0-δpgg0))^2)+8 f  δpqg0 δpgq0 ]));
(SubMinus[λ])=(1/2)(δpqq0+δpgg0-(Sqrt[(((δpqq0-δpgg0))^2)+8 f  δpqg0 δpgq0 ]));
((SubPlus[p])=(1/((SubPlus[λ])-(SubMinus[λ])))((({{δpqq0, 2 f δpqg0}, {δpgq0, δpgg0}}))-(SubMinus[λ])(({{1, 0}, {0, 1}}))))//MatrixForm;
((SubMinus[p])=((-1)/((SubPlus[λ])-(SubMinus[λ])))((({{δpqq0, 2 f δpqg0}, {δpgq0, δpgg0}}))-(SubPlus[λ])(({{1, 0}, {0, 1}}))))//MatrixForm;
(u=-(2/(β0))((SubPlus[p]) .R . (SubPlus[p])+(SubMinus[p]).  R .  (SubMinus[p]))+(1/((SubPlus[λ])-(SubMinus[λ])-(1/2)β0))((SubMinus[p]).  R .  (SubPlus[p]))+(1/((SubMinus[λ])-(SubPlus[λ])-(1/2)β0))((SubPlus[p]) . R.   (SubMinus[p])))//MatrixForm;
(l=(L^(((-2  (SubPlus[λ]))/(β0)) ))(SubPlus[p])+(L^(((-2  (SubMinus[λ]))/(β0)) ))(SubMinus[p]))//MatrixForm;  
δmnsNLOp=(1+((αQ-α0)/(2π))(-(2/(β0)))(δpnsp1-((β1)/(2β0))δpqq0))(L^(-(2/(β0))δpqq0)); δmnsNLOm=(1+((αQ-α0)/(2π))(-(2/(β0)))(δpnsm1-((β1)/(2β0))δpqq0))(L^(-(2/(β0))δpqq0)); 
  
((({{δΓ}, {δg}}))=(l+((αQ)/(2 π))u. l-((α0)/(2 π))l .u).(({{δUn+δDn+6 δsn}, {δgn}})))//MatrixForm;

δuvn=δmnsNLOp*δUn/.η->+1;
δdvn=δmnsNLOp*δDn/.η->+1; 
δqbar=(δΓ-δuvn-δdvn)/6/.η->-1;  
δgnn=δg/.η->-1;
δcq=(4/3)(-s2+(((s1))^2)+((3/2)-(1/(n(n+1))))s1+(1/(n^2))+(1/(2n))+(1/(n+1))-(9/2));
δcg=(1/2)(-((n-1)/(n(n+1)))(s1+1)-(1/(n^2))+(2/(n(n+1))));
momg1NLO=(1/2)(((4/9))(1+((αQ)/(2π))δcq)(δuvn+2 δqbar)+((1/9))(1+((αQ)/(2π))δcq)(δdvn+2 δqbar)+((1/9))(1+((αQ)/(2π))δcq)(2 δqbar)+((4/9)+(1/9)+(1/9))((αQ)/(2π))2 δcg δgnn);

Plot[momg1NLO/.Q->2,{n,1,10},AxesLabel->{n,momentg1nlo}]





data=Table[{n,momg1NLO/.Q->2},{n,1,10,0.5}]

momg1=aa Gamma[1+cc] (((Gamma[-1+bb+n])/(Gamma[bb+cc+n]))+(( ee  Gamma[-0.5`+bb+n])/(Gamma[0.5`+bb+cc+n]))+((ddd Gamma[bb+n])/(Gamma[1+bb+cc+n])));
tt=FindFit[data,momg1,{aa,bb,cc,ddd,ee},n]
xg1Q2=Chop[aa*(x^bb)*(((1-x))^cc)(1+ddd x+ee (x^0.5))/.tt]

Needs["ErrorBarLogPlots`"]
LogLinearPlot[Chop[xg1Q2/.tt],{x,0.01,0.9999}];
ErrorListLogLinearPlot[E143g1pQ2];
Show[%,%%,AxesLabel->{x,xg1pQ2}]

Needs["ErrorBarLogPlots`"]
Nmax=9;
α=3;
β=0.5;
θ=(Sqrt[((  k!(2  k+α+β+1) Gamma[k+α+β+1])/(Gamma[k+α+1]Gamma[k+β+1]))  ])((((-1))^k)/(k!(x^β)(((1-x))^α)))(∂_({x,k}))((x^(β+k))(((1-x))^(α+k)));
ckj=(Sqrt[(( k! (2 k+α+β+1) Gamma[k+α+β+1])/(Gamma[k+α+1]Gamma[k+β+1]))  ])((((-1))^k)/(k!))(1/(j!))(Pochhammer[-k,j]Pochhammer[α+β+k+1,j]Pochhammer[β+j+1,k-j]);Momentg1NLOxG1p=(momg1NLO)/.n->j+2;

aαβ[k_]:=(∑_(j=0)^k)ckj*Momentg1NLOxG1p;

xG1pxQ=(x^β)(((1-x))^α)*((∑_(k=0)^Nmax)θ*aαβ[k]);

LogLinearPlot[{xG1pxQ/.Q->2,xg1Q2},{x,0.0001,0.999},AxesLabel->"(Q^2)=2 (GeV^2)"];
ErrorListLogLinearPlot[E143g1pQ2,AxesLabel->"(Q^2)=2 (GeV^2)"];
Show[%,%%,PlotRange->All,AxesLabel->{x,xg1pQ2}]

Momentg1NLOxgluon=(δgnn)/.n->j+2;

aαβgluon[k_]:=(∑_(j=0)^k)ckj*Momentg1NLOxgluon;
xGluon=(x^β)(((1-x))^α)*((∑_(k=0)^Nmax)θ*aαβgluon[k]);
LogLinearPlot[xGluon/.Q->1,{x,0.0001,0.999},AxesLabel->{x,xgluonQ2},PlotRange->All]

Momentg1NLOxsea=(δqbar)/.n->j+2;
aαβsea[k_]:=(∑_(j=0)^k)ckj*Momentg1NLOxsea;
xδqbar=(x^β)(((1-x))^α)*((∑_(k=0)^Nmax)θ*aαβsea[k]);
LogLinearPlot[xδqbar/.Q->1,{x,0.0001,0.999},AxesLabel->{x,xqbarQ2}]

Momentg1NLOuv=(δuvn)/.n->j+2;
aαβuv[k_]:=(∑_(j=0)^k)ckj*Momentg1NLOuv;
xδuvn=(x^β)(((1-x))^α)*((∑_(k=0)^Nmax)θ*aαβuv[k]);
LogLinearPlot[xδuvn/.Q->1,{x,0.0001,0.999},AxesLabel->{x,xuvQ2}]

Momentg1NLOdv=(δdvn)/.n->j+2;
aαβdv[k_]:=(∑_(j=0)^k)ckj*Momentg1NLOdv;
xδdvn=(x^β)(((1-x))^α)*((∑_(k=0)^Nmax)θ*aαβdv[k]);
LogLinearPlot[xδdvn/.Q->1,{x,0.0001,0.999},AxesLabel->{x,xdvQ2}]

Momentg1NLOuvdoutron=(1+((αQ)/(2π))δcq)(δuvn)/.n->j+2;
aαβuvdoutron[k_]:=(∑_(j=0)^k)ckj*Momentg1NLOuvdoutron;
xδuvndoutron=(x^β)(((1-x))^α)*((∑_(k=0)^Nmax)θ*aαβuvdoutron[k]);
Momentg1NLOdvdoutron=(1+((αQ)/(2π))δcq)(δdvn)/.n->j+2;

aαβdvdoutron[k_]:=(∑_(j=0)^k)ckj*Momentg1NLOdvdoutron;
xδdvndoutron=(x^β)(((1-x))^α)*((∑_(k=0)^Nmax)θ*aαβdvdoutron[k]);
xg1nQ=xG1pxQ-1/6(xδuvndoutron-xδdvndoutron);
wd=0.058;
xg1DQ=1/2(xg1nQ+xG1pxQ)(1-3/2 wd);

Needs["ErrorBarLogPlots`"]
LogLinearPlot[xG1pxQ/.Q->2,{x,0.01,0.9999}];
ErrorListLogLinearPlot[E143g1pQ2];
Show[%,%%,AxesLabel->{x,xg1pQ2}]



LogLinearPlot[xg1nQ/.Q->2,{x,0.01,0.9999}];
ErrorListLogLinearPlot[xg1nE143Q2];
Show[%,%%,AxesLabel->{x,xg1nQ2}]
LogLinearPlot[xg1DQ/.Q->5,{x,0.01,0.9999}];
ErrorListLogLinearPlot[xg1DE143Q5];
Show[%,%%,AxesLabel->{x,xg1DQ2}]

Off[NIntegrate::"inum"];
Q=.
Q=5;
g1y=xG1pxQ/y/.x->y;
g1x=xG1pxQ/x;
(*g2x=-g1x+Integrate[g1y/y,{y,x,1}];*)
G1pxQ0=(x^β)(((1-x))^α)*((∑_(k=0)^0)θ*aαβ[k])/x/.x->y;
g2xy0=Integrate[G1pxQ0/y,{y,x,1},GenerateConditions->False];
G1pxQ1=(x^β)(((1-x))^α)*((∑_(k=1)^1)θ*aαβ[k])/x/.x->y;
g2xy1=Integrate[G1pxQ1/y,{y,x,1},GenerateConditions->False];
G1pxQ2=(x^β)(((1-x))^α)*((∑_(k=2)^2)θ*aαβ[k])/x/.x->y;
g2xy2=Integrate[G1pxQ2/y,{y,x,1},GenerateConditions->False];
G1pxQ3=(x^β)(((1-x))^α)*((∑_(k=3)^3)θ*aαβ[k])/x/.x->y;
g2xy3=Integrate[G1pxQ3/y,{y,x,1},GenerateConditions->False];
G1pxQ4=(x^β)(((1-x))^α)*((∑_(k=4)^4)θ*aαβ[k])/x/.x->y;
g2xy4=Integrate[G1pxQ4/y,{y,x,1},GenerateConditions->False];
G1pxQ5=(x^β)(((1-x))^α)*((∑_(k=5)^5)θ*aαβ[k])/x/.x->y;
g2xy5=Integrate[G1pxQ5/y,{y,x,1},GenerateConditions->False];
G1pxQ6=(x^β)(((1-x))^α)*((∑_(k=6)^6)θ*aαβ[k])/x/.x->y;
g2xy6=Integrate[G1pxQ6/y,{y,x,1},GenerateConditions->False];
G1pxQ7=(x^β)(((1-x))^α)*((∑_(k=7)^7)θ*aαβ[k])/x/.x->y;
g2xy7=Integrate[G1pxQ7/y,{y,x,1},GenerateConditions->False];
G1pxQ8=(x^β)(((1-x))^α)*((∑_(k=8)^8)θ*aαβ[k])/x/.x->y;
g2xy8=Integrate[G1pxQ8/y,{y,x,1},GenerateConditions->False];
G1pxQ9=(x^β)(((1-x))^α)*((∑_(k=9)^9)θ*aαβ[k])/x/.x->y;
g2xy9=Integrate[G1pxQ9/y,{y,x,1},GenerateConditions->False];
g2xv=g2xy0+g2xy1+g2xy2+g2xy3+g2xy4+g2xy5+g2xy6+g2xy7+g2xy8+g2xy9;
g2x=-g1x+g2xv;
LogLinearPlot[x g2x,{x,0.001,0.9999}];
ErrorListLogLinearPlot[E143xg2Q];
Show[%,%%,AxesLabel->{x,xg2pQ2}]
Plot[x g2x,{x,0,1},AxesLabel->{x,xg2pQ2}]
M=0.938;
ξ1=((2x)/(1+(((1+((4(M^2)(x^2))/Q)))^(1/2))));

an[n_?NumberQ]:=NIntegrate[((((ξ1)^(n+1))/(x^2))*(((x/(ξ1))-((n^2)/(((n+2))^2))*((M^2)/Q)*x*ξ1)*g1x-((M^2)/Q)*(x^2)((4*n)/(n+2))*g2x)),{x,0,1},MaxRecursion->12]/.n->2n-1
dn[n_?NumberQ]:=NIntegrate[((((ξ1)^n)/x)*g1x+(((ξ1)^(n+1))/(x^2))*((n/(n-1))*((x^2)/((ξ1)^2))-(n/(n+1))*((M^2)/Q)*(x^2))g2x),{x,0,1},MaxRecursion->12]/.n->2n+1






anj[1]=an[1];
anj[2]=an[2];
anj[3]=an[3];
anj[4]=an[4];
anj[5]=an[5];
anj[6]=an[6];
anj[7]=an[7];
anj[8]=an[8];
anj[9]=an[9];
anj[10]=an[10];
anj[11]=an[11];
anj[12]=an[12];
anj[13]=an[13];
anj[14]=an[14];
anj[15]=an[15];
anj[16]=an[16];
anj[17]=an[17];
anj[18]=an[18];
anj[19]=an[19];
anj[20]=an[20];



dnj[1]=dn[1];
dnj[2]=dn[2];
dnj[3]=dn[3];
dnj[4]=dn[4];
dnj[5]=dn[5];
dnj[6]=dn[6];
dnj[7]=dn[7];
dnj[8]=dn[8];
dnj[9]=dn[9];
dnj[10]=dn[10];
dnj[11]=dn[11];
dnj[12]=dn[12];
dnj[13]=dn[13];
dnj[14]=dn[14];
dnj[15]=dn[15];
dnj[16]=dn[16];
dnj[17]=dn[17];
dnj[18]=dn[18];
dnj[19]=dn[19];
dnj[20]=dn[20];

g1TMC:=(anj[n]+((M^2)/Q)*((n*(n+1))/(((n+2))^2))*(n*(anj[n+2])+4*dnj[n+2])+(((((M^2)/Q)))^2)*((n*(n+1)*(n+2))/(2*(((n+4))^2)))*(n*(anj[n+4])+8*(dnj[n+4]))+(((((M^2)/Q)))^3)*((n*(n+1)*(n+2)*(n+3))/(6*(((n+6))^2)))*(n*(anj[n+6])+12*dnj[n+6]));
Print["first momnt g1TMC in Q^2=5 GeV^2"]
g1TMC/.n->1

datatmc=Table[{n,g1TMC},{n,2,8}]
ListPlot[%]
momg1tmc=aatmc Gamma[1+cctmc] (((Gamma[-1+bbtmc+n])/(Gamma[bbtmc+cctmc+n]))+(( eetmc  Gamma[-0.5`+bbtmc+n])/(Gamma[0.5`+bbtmc+cctmc+n]))+((dddtmc Gamma[bbtmc+n])/(Gamma[1+bbtmc+cctmc+n])));
tttmc=FindFit[datatmc,momg1tmc,{aatmc,bbtmc,cctmc,dddtmc,eetmc},n]
xg1Q5tmc=Chop[aatmc*(x^bbtmc)*(((1-x))^cctmc)(1+dddtmc x+eetmc (x^0.5))/.tttmc]
Plot[%,{x,0,1},AxesLabel->{x,xg1TMCpQ5}]

xg1Q5tmc
LogLinearPlot[{xG1pxQ/.Q->5,xg1Q5tmc},{x,0.0001,0.999},AxesLabel->"(Q^2)=5 (GeV^2)"];
ErrorListLogLinearPlot[E143g1pQ5,AxesLabel->"(Q^2)=5 (GeV^2)"];
Show[%,%%,PlotRange->All,AxesLabel->{x,{xg1TMCpQ5,xG1pQ5}}]

Δf3p=((0.0148376-0.0189575 ChebyshevU[1,y]+0.0121792 ChebyshevU[2,y]-0.0040397 ChebyshevU[3,y]+0.000540845 ChebyshevU[4,y])/(4.15388-4.75525 ChebyshevU[1,y]+2.68417 ChebyshevU[2,y]-0.800306 ChebyshevU[3,y]+0.101095 ChebyshevU[4,y]));

a =5.650556817;
b= 0.986818274;
c =0.064446823;
d =0.807650292;
Δf3n=((a (E^(-((0.5` (1-d) (((-b+y))^2))/(c^2)))))/(1+((d (((-b+y))^2))/(c^2))));
Q=.
Q=5;
G1pxQ=xG1pxQ/x/.x->x/y;

G1nxQ=xg1nQ/x/.x->x/y;
datag1HeE142={{0.035`,-0.248`,0.168243871`},{0.05`,-0.168`,0.076896034`},{0.082`,-0.146`,0.042941821`},{0.124`,-0.141`,0.032449961`},{0.175`,-0.105`,0.026925824`},{0.246`,-0.051`,0.017464249`},{0.343`,0,0.017464249`},{0.466`,-0.007`,0.014142136`}};
datag1HeJlab={{0.33,-0.024,0.0060827},{0.47,-0.004,0.0056568},{0.6,0.001,0.002}};
Needs["ErrorBarLogPlots`"]


g1Q5=Table[{x,NIntegrate[(2 Δf3p *G1pxQ+  Δf3n*G1nxQ)/y/.Q->5,{y,x,3}]},{x,0.01,.9,0.001}];
ListLogLinearPlot[%,Joined->True,ColorFunction->"Rainbow"];
ErrorListLogLinearPlot[{datag1HeE142,datag1HeJlab}];
Show[%,%%,PlotRange->All,AxesLabel->{x,g1He}]

G1pxQ=xG1pxQ/x/.x->x/y;

G1nxQ=xg1nQ/x/.x->x/y;
Δf3p=(((0.0020367 -0.0138505 y+0.0268824 (y^2)-0.020574 (y^3)+0.005509 (y^4))/(1-4.016607 y+6.062886 (y^2)-4.0759251 (y^3)+1.0297459 (y^4))));
Δf3n=(((((0.0368208-0.01201747 y)/(1-1.997566 y+1.008157 (y^2)))))^2);
xg1Q5H3=Table[{x,x NIntegrate[( Δf3p *G1nxQ+ 2 Δf3n*G1pxQ)/y/.Q->2.5,{y,x,3}]},{x,0.001,1,0.01}];
ListLogLinearPlot[%,Joined->True,ColorFunction->"Rainbow",AxesLabel->{x,xg1H3}]